<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:cc="http://java.sun.com/jsf/composite">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="bill" />
    </cc:interface>

    <!-- IMPLEMENTATION -->        
    <cc:implementation>
        <p:dataTable value="#{cc.attrs.bill.billFees}" var="bi" id="tbl">

            <p:column headerText="Fee Name">
                <p:outputLabel value="#{bi.fee.name}"/>
            </p:column>
            <p:column headerText="Fee Type">
                <p:outputLabel value="#{bi.fee.feeType}"/>
            </p:column>
            <p:column headerText="Fee Value" styleClass="numberCol" >
                <p:outputLabel value="#{bi.feeValue}" id="col1" >
                    <f:convertNumber pattern="#,###0.00"  />
                </p:outputLabel> 
            </p:column>
            <p:column headerText="Vat Value" styleClass="numberCol" >
                <p:outputLabel value="#{bi.feeVat}" id="col2" >
                    <f:convertNumber pattern="#,###0.00"  />
                </p:outputLabel> 
            </p:column>
            <p:column headerText="Net Value" styleClass="numberCol" >
                <p:outputLabel value="#{bi.feeVatPlusValue}" id="col3" > 
                    <f:convertNumber pattern="#,###0.00"  />
                </p:outputLabel> 
            </p:column>
            <p:column headerText="Change Value" styleClass="numberCol" rendered="#{sessionController.loggedPreference.applicationInstitution eq 'Cooperative'}" >
                <p:inputText value="#{bi.tmpSettleChangedValue}" disabled="#{!(!bookingController.selectedServiceSession.originatingSession.vatable and cc.attrs.bill.paymentMethod eq 'OnCall')}">
                    <f:ajax execute="@this" render="col1 col2 col3" event="keyup" listener="#{channelBillController.calSettleTotal()}"/>
                </p:inputText>
            </p:column>

        </p:dataTable>
    </cc:implementation>
</html>